package com.unisal.java;

public class RemoteLoaderComVoltarMultiplosComandos {

	public static void main(String[] args) {

		ControleRemotoComVoltar remoteControl = new ControleRemotoComVoltar();

		Luz light = new Luz("Living Room");
		TV tv = new TV("Living Room");
		AparelhoDeSom stereo = new AparelhoDeSom("Living Room");
		Ofuro ofuro = new Ofuro();
 
		LuzAcendeComando lightOn = new LuzAcendeComando(light);
		AparelhoDeSomOnComCDComando stereoOn = new AparelhoDeSomOnComCDComando(stereo);
		TVComandoLiga tvOn = new TVComandoLiga(tv);
		OfuroComandoLiga ofurobOn = new OfuroComandoLiga(ofuro);
		
		LuzApagaComando lightOff = new LuzApagaComando(light);
		AparelhoDeSomOff stereoOff = new AparelhoDeSomOff(stereo);
		TVComandoDesliga tvOff = new TVComandoDesliga(tv);
		OfuroComandoDesliga ofuroOff = new OfuroComandoDesliga(ofuro);

		Comando[] partyOn = { lightOn, stereoOn, tvOn, ofurobOn};
		Comando[] partyOff = { lightOff, stereoOff, tvOff, ofuroOff};
  
		MacroComandos partyOnMacro = new MacroComandos(partyOn);
		MacroComandos partyOffMacro = new MacroComandos(partyOff);
 
		remoteControl.setComando(0, partyOnMacro, partyOffMacro);
  
		System.out.println(remoteControl);
		System.out.println("--- pressionando Macro Liga---");
		remoteControl.botaoLigarFoiPressionado(0);
		System.out.println("--- Pressionando Macro desliga---");
		remoteControl.botaoDesligarFoiPressionado(0);
	}
	
}
